package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.common.annotation.AutoFill;
import com.ruoyi.common.enums.AutoFillType;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DispatchMonitoringSitesMapper;
import com.ruoyi.system.domain.DispatchMonitoringSites;
import com.ruoyi.system.service.IDispatchMonitoringSitesService;

/**
 * 监测站点Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-02
 */
@Service
public class DispatchMonitoringSitesServiceImpl implements IDispatchMonitoringSitesService 
{
    @Autowired
    private DispatchMonitoringSitesMapper dispatchMonitoringSitesMapper;

    /**
     * 查询监测站点
     * 
     * @param monitoringSitesId 监测站点主键
     * @return 监测站点
     */
    @Override
    public DispatchMonitoringSites selectDispatchMonitoringSitesByMonitoringSitesId(Long monitoringSitesId)
    {
        return dispatchMonitoringSitesMapper.selectDispatchMonitoringSitesByMonitoringSitesId(monitoringSitesId);
    }

    /**
     * 查询监测站点列表
     * 
     * @param dispatchMonitoringSites 监测站点
     * @return 监测站点
     */
    @Override
    public List<DispatchMonitoringSites> selectDispatchMonitoringSitesList(DispatchMonitoringSites dispatchMonitoringSites)
    {
        return dispatchMonitoringSitesMapper.selectDispatchMonitoringSitesList(dispatchMonitoringSites);
    }

    /**
     * 新增监测站点
     * 
     * @param dispatchMonitoringSites 监测站点
     * @return 结果
     */
    @AutoFill(operation = AutoFillType.INSERT)
    @Override
    public int insertDispatchMonitoringSites(DispatchMonitoringSites dispatchMonitoringSites)
    {
        return dispatchMonitoringSitesMapper.insertDispatchMonitoringSites(dispatchMonitoringSites);
    }

    /**
     * 修改监测站点
     * 
     * @param dispatchMonitoringSites 监测站点
     * @return 结果
     */
    @AutoFill(operation = AutoFillType.UPDATE)
    @Override
    public int updateDispatchMonitoringSites(DispatchMonitoringSites dispatchMonitoringSites)
    {
        return dispatchMonitoringSitesMapper.updateDispatchMonitoringSites(dispatchMonitoringSites);
    }

    /**
     * 批量删除监测站点
     * 
     * @param monitoringSitesIds 需要删除的监测站点主键
     * @return 结果
     */
    @Override
    public int deleteDispatchMonitoringSitesByMonitoringSitesIds(Long[] monitoringSitesIds)
    {
        return dispatchMonitoringSitesMapper.deleteDispatchMonitoringSitesByMonitoringSitesIds(monitoringSitesIds);
    }

    /**
     * 删除监测站点信息
     * 
     * @param monitoringSitesId 监测站点主键
     * @return 结果
     */
    @Override
    public int deleteDispatchMonitoringSitesByMonitoringSitesId(Long monitoringSitesId)
    {
        return dispatchMonitoringSitesMapper.deleteDispatchMonitoringSitesByMonitoringSitesId(monitoringSitesId);
    }
}
